home *** CD-ROM | disk | FTP | other *** search
- function fnOpenHighScores()
- {
- getURL(sw10,"_self");
- }
- function fnPostHighScore(score)
- {
- postClip.score = score;
- postClip.score2 = fnCalcHash(gScore);
- if(debug == "yes")
- {
- debug_mc.debugstring += "SENDING SCORE " + postClip.score + " and hash " + postClip.score2 + " to " + sw4;
- }
- postClip.sendAndLoad(sw4,varReceiver,"POST");
- }
- function fnCalcHash(score)
- {
- var hash;
- var x = Math.sin(score + 5774).toString();
- trace("Sin is " + x);
- var pindx = x.indexOf(".") + 1;
- hash += x.slice(pindx + 5,pindx + 6);
- hash += x.slice(pindx + 4,pindx + 5);
- hash += x.slice(pindx + 3,pindx + 4);
- hash += x.slice(pindx + 2,pindx + 3);
- hash += x.slice(pindx + 1,pindx + 2);
- hash += x.slice(pindx,pindx + 1);
- trace("Hash is " + hash);
- return hash;
- }
- if(debug == "yes")
- {
- debug_mc.debugstring += " SWF4: " + gameMC.sw4;
- debug_mc.debugstring += " SWF10: " + gameMC.sw10;
- debug_mc.debugstring += " SWF2: " + gameMC.sw2;
- }
- var postClip = new LoadVars();
- var varReceiver = new LoadVars();
-